package com.han.hotelplat.pojo.task;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.han.hotelplat.model.AreaModel;
import com.han.hotelplat.pojo.emtask.Emtask;
import com.han.hotelplat.pojo.hotel.Hotel;

/**
 * Task entity. @author MyEclipse Persistence Tools
 */

public class Task{
/**
 * CREATE TABLE `tb_task` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `taskid` varchar(31) DEFAULT NULL COMMENT '任务id前端显示用',
  `hotelid` int(11) DEFAULT NULL COMMENT '酒店id',
  `publisher` bigint(61) DEFAULT NULL COMMENT '发布者（酒店管家id）',
  `creattime` datetime DEFAULT NULL COMMENT '发布时间',
  `starttime` date DEFAULT NULL COMMENT '任务开始日期',
  `endtime` date DEFAULT NULL COMMENT '任务结束日期',
  `remark` varchar(255) DEFAULT NULL COMMENT '任务描述',
  `welfare` varchar(61) DEFAULT NULL COMMENT '福利',
  `usercount` int(4) DEFAULT NULL COMMENT '招募人数',
  `lowestroom` int(5) DEFAULT NULL COMMENT '每日最低房量（直接从酒店对象中取）',
  `unitprice` float DEFAULT NULL COMMENT '单价',
  `state` int(1) DEFAULT NULL COMMENT '状态1发布中，2待服务，3已取消，4服务中，5已服务，6已结束',
  `stopdate` date DEFAULT NULL COMMENT '截止日期（当任务在服务中被截止后该字段不能为null）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

 */
	// Fields

	private Integer id;
	private String taskid;
	private Integer hotelid;
	private String publisher;
	private Date creattime;
	private Date starttime;
	private Date endtime;
	private String remark;
	private String welfare;
	private Integer usercount;
	private Float lowestroom;
	private Float unitprice;//酒店单价
	private Integer state;
	private Date stopdate;
	private Integer doublemoney;
	private String cancercause;
	private Float emunitprice;//帮工单价
	private Integer showapp;//是否客户端可见
	private String canceruser;//任务取消者
	private String tel;//联系电话
	private String realname;//联系人
	private Integer tasktype;//任务类型0临时任务，1定点任务
	private Integer accepttype;//报名类型0不间断报名，1自由报名（临时任务才有效）
	//
	private String location;//酒店位置
	private float taskroomcount;//每日最低房量
	private int emenroll;//当前报名人数
	private int countdown;//任务开始倒计时
	private int authAttendance;//是否确认当天的考勤
	private String hotelname;//酒店名称
	
	private float consume;//累积服务费
	private float emconsume;//帮工累积报酬
	private float todayroomcount;//当日清洁房量
	private Float sumroomcount;//已清洁房量量
	private int days;//已清洁天数
	
	private Integer isJoin;//是否已报名1已报名，2未报名
	private Date jointime;//报名时间
	private Integer isUpWord;//是否已提交当日考勤
	private Date nowdatetime;//当天任务时间
	private Integer isCancelOfHepler;//是否为帮工取消的订单1是，2否
	private Date accepttime;//帮工的接单时间
	private Integer isConfirmWork;//是否已确认考勤
	
	private Integer weight;//权重，查询用
	private Hotel hotel;//酒店
	private Integer area;
	private float emEeward;//帮工总收入
	private Map<String, List<Emtask>> emtMap;
	private AreaModel[] areaModel;
	private String roomprice;//酒店单价多房型
	private String roomEmprice;//帮工单价多房型
	private String roomCount;//房量多房型
	
	private Integer isedit;//是否可被修改1可以被修改，2不能被修改
	
	private String distance;//距离
	
	/** default constructor */
	public Task() {
	}

	/** full constructor */
	public Task(String taskid, Integer hotelid, String publisher,
			Date creattime, Date starttime, Date endtime, String remark,
			String welfare, Integer usercount, Float lowestroom,
			Float unitprice, Integer state, Date stopdate,Integer doublemoney,
			String cancercause, Float emunitprice, Integer showapp, String canceruser, 
			Integer tasktype, Integer accepttype) {
		this.taskid = taskid;
		this.hotelid = hotelid;
		this.publisher = publisher;
		this.creattime = creattime;
		this.starttime = starttime;
		this.endtime = endtime;
		this.remark = remark;
		this.welfare = welfare;
		this.usercount = usercount;
		this.lowestroom = lowestroom;
		this.unitprice = unitprice;
		this.state = state;
		this.stopdate = stopdate;
		this.doublemoney = doublemoney;
		this.cancercause = cancercause;
		this.emunitprice = emunitprice;
		this.showapp = showapp;
		this.canceruser = canceruser;
		this.tasktype = tasktype;
		this.accepttype = accepttype;
	}

	public Task(String taskid, Integer hotelid, String publisher,
			Date creattime, Date starttime, Date endtime, String remark,
			String welfare, Integer usercount, Float lowestroom,
			Float unitprice, Integer state, Date stopdate,Integer doublemoney) {
		this.taskid = taskid;
		this.hotelid = hotelid;
		this.publisher = publisher;
		this.creattime = creattime;
		this.starttime = starttime;
		this.endtime = endtime;
		this.remark = remark;
		this.welfare = welfare;
		this.usercount = usercount;
		this.lowestroom = lowestroom;
		this.unitprice = unitprice;
		this.state = state;
		this.stopdate = stopdate;
		this.doublemoney = doublemoney;
	}
	
	public Task(String taskid, Integer hotelid, String publisher,
			Date creattime, Date starttime, Date endtime, String remark,
			String welfare, Integer usercount, Float lowestroom,
			Float unitprice, Integer state, Date stopdate, String location,
			Integer doublemoney) {
		this.taskid = taskid;
		this.hotelid = hotelid;
		this.publisher = publisher;
		this.creattime = creattime;
		this.starttime = starttime;
		this.endtime = endtime;
		this.remark = remark;
		this.welfare = welfare;
		this.usercount = usercount;
		this.lowestroom = lowestroom;
		this.unitprice = unitprice;
		this.state = state;
		this.stopdate = stopdate;
		this.location = location;
		this.doublemoney = doublemoney;
	}
	
	public Task(String taskid, Integer hotelid, String publisher,
			Date creattime, Date starttime, Date endtime, String remark,
			String welfare, Integer usercount, Float lowestroom,
			Float unitprice, Integer state, Date stopdate,Integer doublemoney,
			Date accepttime) {
		this.taskid = taskid;
		this.hotelid = hotelid;
		this.publisher = publisher;
		this.creattime = creattime;
		this.starttime = starttime;
		this.endtime = endtime;
		this.remark = remark;
		this.welfare = welfare;
		this.usercount = usercount;
		this.lowestroom = lowestroom;
		this.unitprice = unitprice;
		this.state = state;
		this.stopdate = stopdate;
		this.doublemoney = doublemoney;
		this.accepttime = accepttime;
	}
	
	/**
	 * 
		 * @description	后台查询列表用
		 * @author  han1088
		 * @return
	 */
	public Task(Integer id, String taskid, String hotelname, String tel, 
			Integer area, Date starttime, Date endtime, Float unitprice, 
			Float emunitprice, Integer state, Integer usercount, String publisher,
			Date creattime, Integer hotelid){
		this.id = id;
		this.taskid = taskid;
		this.hotelname = hotelname;
		this.tel = tel;
		this.area = area;
		this.starttime = starttime;
		this.endtime = endtime;
		this.unitprice = unitprice;
		this.emunitprice = emunitprice;
		this.state = state;
		this.usercount = usercount;
		this.publisher = publisher;
		this.creattime = creattime;
		this.hotelid = hotelid;
	}
	
	public Task(Integer id, String taskid, String hotelname, String tel, 
			Integer area, Date starttime, Date endtime, Float unitprice, 
			Float emunitprice, Integer state, Integer usercount, String publisher,
			Date creattime){
		this.id = id;
		this.taskid = taskid;
		this.hotelname = hotelname;
		this.tel = tel;
		this.area = area;
		this.starttime = starttime;
		this.endtime = endtime;
		this.unitprice = unitprice;
		this.emunitprice = emunitprice;
		this.state = state;
		this.usercount = usercount;
		this.publisher = publisher;
		this.creattime = creattime;
	}
	
	public Task(Integer id, String taskid, String hotelname, String tel, 
			Integer area, Date starttime, Date endtime, Float unitprice, 
			Float emunitprice, Integer state, Integer usercount, String publisher,
			Date creattime, Date stopdate, String realname){
		this.id = id;
		this.taskid = taskid;
		this.hotelname = hotelname;
		this.tel = tel;
		this.area = area;
		this.starttime = starttime;
		this.endtime = endtime;
		this.unitprice = unitprice;
		this.emunitprice = emunitprice;
		this.state = state;
		this.usercount = usercount;
		this.publisher = publisher;
		this.creattime = creattime;
		this.stopdate = stopdate;
		this.realname = realname;
	}
	
	public Task(Integer id, String taskid, String hotelname, String tel, 
			Integer area, Date starttime, Date endtime, Float unitprice, 
			Float emunitprice, Integer state, Integer usercount, String publisher,
			Date creattime, Date stopdate){
		this.id = id;
		this.taskid = taskid;
		this.hotelname = hotelname;
		this.tel = tel;
		this.area = area;
		this.starttime = starttime;
		this.endtime = endtime;
		this.unitprice = unitprice;
		this.emunitprice = emunitprice;
		this.state = state;
		this.usercount = usercount;
		this.publisher = publisher;
		this.creattime = creattime;
		this.stopdate = stopdate;
	}
	
	
	public Task(String taskid, Integer showapp,  Date starttime,Integer hotelid,
			Float emunitprice, Integer usercount, Date endtime) {
		this.taskid = taskid;
		this.hotelid = hotelid;
		this.starttime = starttime;
		this.emunitprice = emunitprice;
		this.showapp = showapp;
		this.usercount = usercount;
		this.endtime = endtime;
	}

	public Task(String taskid, Integer showapp,  Date starttime,Integer hotelid,
			Float emunitprice, Integer usercount, Date endtime, Integer state) {
		this.taskid = taskid;
		this.hotelid = hotelid;
		this.starttime = starttime;
		this.emunitprice = emunitprice;
		this.showapp = showapp;
		this.usercount = usercount;
		this.endtime = endtime;
		this.state = state;
	}
	
	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTaskid() {
		return this.taskid;
	}

	public void setTaskid(String taskid) {
		this.taskid = taskid;
	}

	public Integer getHotelid() {
		return this.hotelid;
	}

	public void setHotelid(Integer hotelid) {
		this.hotelid = hotelid;
	}

	public String getPublisher() {
		return this.publisher;
	}

	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}

	public Date getCreattime() {
		return this.creattime;
	}

	public void setCreattime(Date creattime) {
		this.creattime = creattime;
	}

	public Date getStarttime() {
		return this.starttime;
	}

	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}

	public Date getEndtime() {
		return this.endtime;
	}

	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}

	

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getWelfare() {
		return this.welfare;
	}

	public void setWelfare(String welfare) {
		this.welfare = welfare;
	}

	public Integer getUsercount() {
		return this.usercount;
	}

	public void setUsercount(Integer usercount) {
		this.usercount = usercount;
	}

	public Float getLowestroom() {
		return this.lowestroom;
	}

	public void setLowestroom(Float lowestroom) {
		this.lowestroom = lowestroom;
	}

	public Float getUnitprice() {
		return this.unitprice;
	}

	public void setUnitprice(Float unitprice) {
		this.unitprice = unitprice;
	}

	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Date getStopdate() {
		return this.stopdate;
	}

	public void setStopdate(Date stopdate) {
		this.stopdate = stopdate;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public float getTaskroomcount() {
		return taskroomcount;
	}

	public void setTaskroomcount(Float taskroomcount) {
		this.taskroomcount = taskroomcount;
	}

	public int getEmenroll() {
		return emenroll;
	}

	public void setEmenroll(int emenroll) {
		this.emenroll = emenroll;
	}

	public float getConsume() {
		return consume;
	}

	public void setConsume(float consume) {
		this.consume = consume;
	}

	public float getEmconsume() {
		return emconsume;
	}

	public void setEmconsume(float emconsume) {
		this.emconsume = emconsume;
	}

	public float getTodayroomcount() {
		return todayroomcount;
	}

	public void setTodayroomcount(float todayroomcount) {
		this.todayroomcount = todayroomcount;
	}

	public Float getSumroomcount() {
		return sumroomcount;
	}

	public void setSumroomcount(Float sumroomcount) {
		this.sumroomcount = sumroomcount;
	}

	public int getDays() {
		return days;
	}

	public void setDays(int days) {
		this.days = days;
	}

	public int getCountdown() {
		return countdown;
	}

	public void setCountdown(int countdown) {
		this.countdown = countdown;
	}

	public int getAuthAttendance() {
		return authAttendance;
	}

	public void setAuthAttendance(int authAttendance) {
		this.authAttendance = authAttendance;
	}

	public Integer getDoublemoney() {
		return doublemoney;
	}

	public void setDoublemoney(Integer doublemoney) {
		this.doublemoney = doublemoney;
	}

	public Integer getWeight() {
		return weight;
	}

	public void setWeight(Integer weight) {
		this.weight = weight;
	}

	public String getHotelname() {
		return hotelname;
	}

	public void setHotelname(String hotelname) {
		this.hotelname = hotelname;
	}

	public String getCancercause() {
		return cancercause;
	}

	public void setCancercause(String cancercause) {
		this.cancercause = cancercause;
	}

	public Integer getIsJoin() {
		return isJoin;
	}

	public void setIsJoin(Integer isJoin) {
		this.isJoin = isJoin;
	}

	public Integer getIsUpWord() {
		return isUpWord;
	}

	public void setIsUpWord(Integer isUpWord) {
		this.isUpWord = isUpWord;
	}

	public Date getNowdatetime() {
		return new Date();
	}

	public void setNowdatetime(Date nowdatetime) {
		this.nowdatetime = nowdatetime;
	}

	public Integer getIsCancelOfHepler() {
		return isCancelOfHepler;
	}

	public void setIsCancelOfHepler(Integer isCancelOfHepler) {
		this.isCancelOfHepler = isCancelOfHepler;
	}

	public Hotel getHotel() {
		return hotel;
	}

	public void setHotel(Hotel hotel) {
		this.hotel = hotel;
	}

	public Date getAccepttime() {
		return accepttime;
	}

	public void setAccepttime(Date accepttime) {
		this.accepttime = accepttime;
	}

	public Float getEmunitprice() {
		return emunitprice;
	}

	public void setEmunitprice(Float emunitprice) {
		this.emunitprice = emunitprice;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public Integer getArea() {
		return area;
	}

	public void setArea(Integer area) {
		this.area = area;
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public float getEmEeward() {
		return emEeward;
	}

	public void setEmEeward(float emEeward) {
		this.emEeward = emEeward;
	}

	public Map<String, List<Emtask>> getEmtMap() {
		return emtMap;
	}

	public void setEmtMap(Map<String, List<Emtask>> emtMap) {
		this.emtMap = emtMap;
	}

	public AreaModel[] getAreaModel() {
		return areaModel;
	}

	public void setAreaModel(AreaModel[] areaModel) {
		this.areaModel = areaModel;
	}

	public Integer getIsConfirmWork() {
		return isConfirmWork;
	}

	public void setIsConfirmWork(Integer isConfirmWork) {
		this.isConfirmWork = isConfirmWork;
	}

	public Integer getShowapp() {
		return showapp;
	}

	public void setShowapp(Integer showapp) {
		this.showapp = showapp;
	}
	
	public String getCanceruser() {
		return canceruser;
	}

	public void setCanceruser(String canceruser) {
		this.canceruser = canceruser;
	}

	public String getDistance() {
		return distance;
	}

	public void setDistance(String distance) {
		this.distance = distance;
	}

	public Integer getIsedit() {
		return isedit;
	}

	public void setIsedit(Integer isedit) {
		this.isedit = isedit;
	}

	public Date getJointime() {
		return jointime;
	}

	public void setJointime(Date jointime) {
		this.jointime = jointime;
	}

	public String getRoomprice() {
		return roomprice;
	}

	public void setRoomprice(String roomprice) {
		this.roomprice = roomprice;
	}

	public String getRoomEmprice() {
		return roomEmprice;
	}

	public void setRoomEmprice(String roomEmprice) {
		this.roomEmprice = roomEmprice;
	}

	public String getRoomCount() {
		return roomCount;
	}

	public void setRoomCount(String roomCount) {
		this.roomCount = roomCount;
	}

	public void setTaskroomcount(float taskroomcount) {
		this.taskroomcount = taskroomcount;
	}

	public Integer getTasktype() {
		return tasktype;
	}

	public void setTasktype(Integer tasktype) {
		this.tasktype = tasktype;
	}

	public Integer getAccepttype() {
		return accepttype;
	}

	public void setAccepttype(Integer accepttype) {
		this.accepttype = accepttype;
	}
	
}